package strategy

import "sort"

type QuickSortStrategy struct {
}

func (s *QuickSortStrategy) Sort(nums []int) {
	if len(nums) == 0 {
		return
	}

	sort.Ints(nums)
}

type BubbleSortStrategy struct {
}

func (s *BubbleSortStrategy) Sort(nums []int) {
	if len(nums) == 0 {
		return
	}

	for i := 0; i < len(nums); i++ {
		for j := i + 1; j < len(nums); j++ {
			if nums[i] > nums[j] {
				nums[i], nums[j] = nums[j], nums[i]
			}
		}
	}
}
